#
# src/core/test
#


include_directories(${Qwt6_INCLUDE_DIR})
include_directories(${CMAKE_SOURCE_DIR}/core)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

# === CppUnit tests.
set(clean_test_SRC
    src/CppUnitMain.cpp
    src/TestTimeSeries.cpp
)
add_executable(core_test ${clean_test_SRC})
target_link_libraries(core_test
    plot_widget
    core
    ${Qwt6_Qt4_LIBRARY}
    ${QT_QTCORE_LIBRARY}
    ${CPPUNIT_LIBRARIES}
)
add_test(core_test core_test)


# === QtTest unit testing.
qt4_wrap_cpp(core_test_MOC QTest_time_series.h)
add_executable(qtest_core ${core_test_MOC})
target_link_libraries(qtest_core
    core
    plot_widget
    ${Qwt6_Qt4_LIBRARY}
    ${QT_QTTEST_LIBRARY}
    ${QT_QTGUI_LIBRARY}
)
